<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible">
    <title>后台管理主页</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="shortcut icon" href="/static/img/Head.png" type="image/x-icon"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../static/plugins/AdminLTE-2.4.2/css/AdminLTE.min.css">
    <link rel="stylesheet" href="../static/plugins/AdminLTE-2.4.2/css/skins/skin-blue.css">
    <link rel="stylesheet" href="../static/plugins/jedate-6.0.2/skin/jedate.css"/>
    <link rel="stylesheet" href="../static/plugins/zTree_v3/zTreeStyle/zTreeStyle.css"/>
    <style>
        .content-wrapper {
            background-color: #fff;
        }

        .treeview-menu {
            padding-left: 15px;
        }

        a {
            cursor: pointer;
        }

        .fixedShade {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 9999;
            background-color: rgb(0, 0, 0);
            background-color: rgba(0, 0, 0, 0.8);
        }

        .messages-menu ul.menu > li {
            height: 61px;
            overflow: hidden;
        }

        .messages-menu ul.menu .msgDesc {
            color: #777;
            overflow: hidden;
            word-break: keep-all;
            white-space: nowrap;
            text-overflow: ellipsis;
            font-weight: normal;
        }

        .navbar-nav > .messages-menu > .dropdown-menu > li .menu {
            max-height: 310px;
        }

        .user-body .row a {
            padding: 5px 0;
        }

        .navbar-nav > .user-menu > .dropdown-menu > .user-body a:hover {
            color: #00a65a !important;
        }

        .content_loading {
            position: absolute;
            z-index: 999;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, .4);
            display: none;
        }

        .content_loading img {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            margin: auto;
            display: inline-block;
        }
    </style>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="fixedShade" style="display: none;"></div>
<div class="wrapper">
    <!-- 头部 导航条 -->
    <header class="main-header">
        <!-- Logo标志 -->
        <a href="javascript:void(0)" class="logo">
            <!-- 侧边栏迷你50 X 50像素迷你标志 -->
            <span class="logo-mini">幂<b>OA</b></span>
            <!-- 常规状态标志和移动设备标志 -->
            <span class="logo-lg">1的N次幂的<b>OA</b>系统</span>
        </a>
        <!-- 头部导航条 -->
        <nav class="navbar navbar-static-top" role="navigation">
            <!-- 侧边栏收起和展开按钮，显示为三根横线-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button"></a>
            <!-- 导航条，右侧菜单 -->
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- 消息-->
                    <!--<li class="dropdown messages-menu message">
                        &lt;!&ndash;消息-展开消息的按钮&ndash;&gt;
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-envelope-o"></i>
                            <span class="label label-success"></span>
                        </a>
                        &lt;!&ndash;消息-展开之后的具体信息&ndash;&gt;
                        <ul class="dropdown-menu">
                            <li class="header have-message">您有<span></span>条未读消息</li>
                            <li class="header no-message" style="display: none;">没有消息！</li>
                            <li>
                                <ul class="menu">
                                    &lt;!&ndash;<li>
                                        <a href="#">
                                            <div class="pull-left">
                                                <img src="../static/img/chendongdong.bmp" class="img-circle" alt="User Image">
                                            </div>
                                            <h4>
                                                <span class="nickname">陈冬冬</span>
                                                <small><i class="fa fa-clock-o"></i><span> 5 分钟前</span></small>
                                            </h4>
                                            <div class="msgDesc">借我500块钱。没钱了xxxxxxxxxxxxxxxx！</div>
                                        </a>
                                    </li>&ndash;&gt;

                                </ul>
                            </li>
                            <li class="footer"><a href="#"><i class="fa fa-navicon fa-md"></i> 查看 所有信息</a></li>
                        </ul>
                    </li>-->
                    <!-- 通知-->
                    <li class="dropdown notifications-menu">
                        <!-- 通知-展开通知的按钮-->
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-bell-o"></i>
                            <span class="label label-warning">10</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">您有10条通知</li>
                            <li>
                                <ul class="menu">
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-users text-aqua"></i> 系统出现异常，空指针异常
                                        </a>
                                        <a href="#">
                                            <i class="fa fa-users text-aqua"></i> 系统出现异常，SQL异常
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li class="footer"><a href="#"><i class="fa fa-navicon fa-md"></i> 查看 所有通知</a></li>
                        </ul>
                    </li>
                    <!-- 任务 -->
                    <!--<li class="dropdown tasks-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-flag-o"></i>
                            <span class="label label-danger">9</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">您有9个任务</li>
                            <li>
                                <ul class="menu">
                                    <li>
                                        <a href="#">
                                            <h3>
                                                尚硅谷SpringBoot视频
                                                <small class="pull-right">进度：10%</small>
                                            </h3>
                                            <div class="progress xs">
                                                &lt;!&ndash;进度条设置&ndash;&gt;
                                                <div class="progress-bar progress-bar-aqua" style="width: 10%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                   &lt;!&ndash;<span class="sr-only">10% 完成</span>&ndash;&gt;
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li class="footer">
                                <a href="#"><i class="fa fa-navicon fa-md"></i> 查看 所有任务</a>
                            </li>
                        </ul>
                    </li>-->
                    <!-- 登录人 -->
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="../static/img/Head.png" class="user-image" alt="User Image">
                            <span class="hidden-xs">名称</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="user-header">
                                <img src="../static/img/Head.png" class="img-circle" alt="User Image">
                                <p>名称</p>
                            </li>
                            <li class="user-body">
                                <div class="row">
                                    <div class="col-xs-4 text-center">
                                        <a href="#">个人信息</a>
                                    </div>
                                    <div class="col-xs-4 text-center" style="visibility: hidden">
                                        <a href="#"></a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="javascript:void(0)"
                                           onclick="document.getElementsByClassName('friendLink')[0].click()">友链</a>
                                    </div>
                                </div>
                            </li>
                            <li class="user-footer">
                                <div class="pull-right">
                                    <a id="exit" class="btn btn-default btn-flat">安全退出</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                    <!-- 设置 -->
                    <li>
                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>

    <!-- 左侧菜单栏 -->
    <aside class="main-sidebar">
        <section class="sidebar">
            <!--左侧菜单栏 -头像区域-->
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="../static/img/Head.png" class="img-circle" alt="User Image">
                </div>
                <div class="pull-left info">
                    <p>名称</p>
                    <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
                </div>
            </div>
            <!--左侧菜单栏 -搜索框-->
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="搜索...">
                    <span class="input-group-btn">
                                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i
                                        class="fa fa-search"></i></button>
                            </span>
                </div>
            </form>
            <!-- 左侧菜单栏 -主菜单按钮 -->
            <ul class="sidebar-menu" data-widget="tree">
                <li>
                    <a href="javascript:void(0)" data-url="/page/statistics/index.html" data-tip="对站点数据进行统计报表">
                        <i class="fa fa-area-chart fa-fw"></i> <span>站点统计</span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#"><i class="fa fa-user-circle-o"></i>
                        <span>角色与权限</span>
                        <span class="pull-right-container">
                                    <i class="fa fa-angle-left pull-right"></i>
                                </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="javascript:void(0)" data-url="" data-tip="对用户进行查看、分配角色和权限等"><i
                                class="fa fa-leaf"></i> <span>用户管理</span></a></li>
                        <li><a href="javascript:void(0)" data-url="" data-tip="角色查看和编辑"><i class="fa fa-leaf"></i>
                            <span>角色管理</span></a></li>
                        <li><a href="javascript:void(0)" data-url="" data-tip="权限查看和编辑"><i class="fa fa-leaf"></i>
                            <span>权限管理</span></a></li>
                        <li><a href="javascript:void(0)" data-url="../page/rolePower/AccountManagement/index.html" data-tip="账号管理"><i class="fa fa-leaf"></i>
                            <span>账号管理</span></a></li>
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#"><i class="fa fa-bookmark-o"></i>
                        <span>菜单控制</span>
                        <span class="pull-right-container">
                                    <i class="fa fa-angle-left pull-right"></i>
                                </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="javascript:void(0)" data-url="../page/navBar/front/index.html"
                               data-tip="对前台菜单进行查看和编辑"><i class="fa fa-leaf"></i> <span>前台菜单管理</span></a></li>
                        <li><a href="javascript:void(0)" data-url="" data-tip="对后台菜单进行查看和编辑"><i class="fa fa-leaf"></i>
                            <span>后台菜单管理</span></a></li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:void(0)" data-url="../page/article/index.html" data-tip="对发布的文章进行查看和编辑">
                        <i class="fa fa-th"></i> <span>我的文章</span>
                    </a>
                </li>
                <li class="comment">
                    <a href="javascript:void(0)" data-url="../page/message/index.html" data-tip="对留言和文章评论进行审核、回复">
                        <i class="fa fa-envelope"></i>
                        <span>评论与留言</span>
                        <span class="pull-right-container">
                                    <small class="label pull-right bg-red "></small>
                                </span>
                    </a>
                </li>
                <li>
                    <a href="javascript:void(0)" data-url="../page/notice/back/index.html" data-tip="公告管理">
                        <i class="fa fa-pencil-square"></i>
                        <span>公告</span>
                        <span class="pull-right-container">
                                    <small class="label pull-right bg-red"></small>
                                </span>
                    </a>
                </li>
                <li>
                    <a href="javascript:void(0)" class="friendLink" data-url="../page/friendLink/index.html"
                       data-tip="友链管理">
                        <i class="fa fa-link"></i>
                        <span>友链</span>
                        <span class="pull-right-container">
                                    <small class="label pull-right bg-red"></small>
                                </span>
                    </a>
                </li>
            </ul>
        </section>
    </aside>

    <!-- 中间内容区域 -->
    <div class="content-wrapper">
        <div class="content_loading">
            <img src="/static/img/loading.svg"/>
        </div>
        <section class="content-header">
            <ol class="breadcrumb">

            </ol>
            <h1>
                <span>发布信息</span>
                <small>描述</small>
            </h1>
        </section>
        <section class="content container-fluid" style="position: relative;">

        </section>

    </div>

    <!-- 底部页脚 -->
    <footer class="main-footer">
        <strong>Copyright &copy;2018<a hrf="javascript:void(0)"> 1的N次幂 滇ICP备18002838号.</a> 版权所有.</strong>
    </footer>

    <!-- 右侧设置栏 -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- 小图标，标签页 -->
        <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
            <li class="active">
                <a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a>
            </li>
            <li>
                <a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a>
            </li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane active" id="control-sidebar-home-tab">
                <h3 class="control-sidebar-heading">近期活动</h3>
                <ul class="control-sidebar-menu">
                    <li>
                        <a href="javascript:void(0);">
                            <i class="menu-icon fa fa-birthday-cake bg-red"></i>
                            <div class="menu-info">
                                <h4 class="control-sidebar-subheading">我的生日</h4>
                                <p>2018年11月4日</p>
                            </div>
                        </a>
                    </li>
                </ul>
                <h3 class="control-sidebar-heading">任务进度</h3>
                <ul class="control-sidebar-menu">
                    <li>
                        <a href="javascript:void(0);">
                            <h4 class="control-sidebar-subheading">
                                尚硅谷SpringBoot视屏
                                <span class="pull-right-container">
                                            <span class="label label-danger pull-right">70%</span>
                                        </span>
                            </h4>
                            <div class="progress progress-xxs">
                                <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
                            </div>
                        </a>
                    </li>
                </ul>
            </div>
            <div class="tab-pane" id="control-sidebar-settings-tab">
                <form method="post">
                    <h3 class="control-sidebar-heading">常规设置</h3>
                    <div class="form-group">
                        <label class="control-sidebar-subheading">
                            皮肤设置<input type="checkbox" class="pull-right" checked>
                        </label>
                        <p>蓝色皮肤</p>
                        <p>黄色皮肤</p>
                    </div>
                </form>
            </div>
        </div>
    </aside>
    <div class="control-sidebar-bg"></div>
</div>
<script type="text/javascript" src="/static/plugins/jQuery/jquery-3.3.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
        integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
        crossorigin="anonymous"></script>
<script src="../static/plugins/AdminLTE-2.4.2/js/adminlte.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.nicescroll/3.5.6/jquery.nicescroll.js"></script>
<script src="../static/plugins/jedate-6.0.2/jquery.jedate.min.js"></script>
<script src="../static/plugins/zTree_v3/js/jquery.ztree.core.js"></script>
<script src="../static/plugins/layer-3.1.1/layer.js"></script>
<script>

</script>
<script>
    var globalVar = {
        curUrl: "",//当前内容区域的url地址
        isLoadedMessageWin: false,//是否加载过消息弹窗
        messageIsLastPage: false,//消息是否是最后一页
        messageSize: 0//消息条数
    };
    $(function () {
        $("html").niceScroll({
            cursorcolor: "#48c55e",
            cursoropacitymax: 1,
            touchbehavior: false,
            cursorwidth: "3px",
            cursorborder: "0",
            cursorborderradius: "3px",
            autohidemode: false,
            mousescrollstep: 80
        });
    })
    $(function () {
        loadUserMsg();//获取登录人信息
        loadMessageTotal();//加载评论和留言条数(待审核的)
        $(".sidebar-menu").on("click", "li a", treeviewMenuBtnClick);//左侧树形菜单点击事件
        $(".sidebar-menu li").eq(0).find("a").trigger("click");
        $(".notifications-menu ul.dropdown-menu").on("click", "a", notificationsMenuClick);//消息盒子事件
        $("#exit").click(exitBtn);//安全退出操作
    })

    function loadUserMsg() {
        $.ajax({
            url: "/user/back/getLoginUser.zb",
            type: "POST",
            dataType: "JSON"
        }).done(function (res) {
            if (res) {
                $(".user-panel .image img").attr("src", res.header_img);
                $(".info p").text(res.nickname);

                $(".user-menu img.user-image").attr("src", res.header_img);
                $(".user-menu a span").text(res.nickname);

                $(".user-header img.img-circle").attr("src", res.header_img);
                $(".user-header p").text(res.nickname)

            }
        }).fail(function () {
            layer.msg("可能由于网络等原因加载个人信息失败！", fn);
        })
    }

    function loadMessageTotal() {
        $.ajax({
            url: "../message/back/getMessage.zb",
            type: "POST",
            dataType: "JSON",
            contentType: "application/json",
            data: JSON.stringify({auditStatus: 0, pageSize: 1, pageNum: 1})
        }).done(function (data) {
            if (data) {
                $(".sidebar-menu .comment small").text(data.total);
            } else {
                layer.msg("加载消息统计失败!", fn);
            }
        }).fail(function () {
            layer.msg("加载消息统计失败！", fn);
        })
    }

    function notificationsMenuClick() {
        alert(111)
    }

    function exitBtn() {
        $.ajax({
            url: "../login/back/exit.zb",
            type: "GET",
            dataType: "JSON"
        }).done(function (res) {
            if (res) {
                window.location.href = "../login.html";
            } else {
                layer.msg("可能长时间与服务器断开，session已经过期！", function () {
                    window.location.href = "../login.html";
                });
            }
        }).fail(function () {
            layer.msg("系统错误，退出失败！", fn)
        })
    }

    function treeviewMenuBtnClick() {
        if (!$(this).parent().hasClass("treeview")) {//有下拉菜单的不让执行
            $(".sidebar-menu li").removeClass("active");
            $(this).parent("li").addClass("active");
            $(".content-wrapper .content").empty();
            var url = $(this).attr("data-url");
            $(".content-wrapper .content-header h1 span").text($(this).find("span").eq(0).text());
            $(".content-wrapper .content-header h1 small").text($(this).attr("data-tip"));
            var $li = $(this).parentsUntil("ul.sidebar-menu").filter("li");
            var $breadcrumb = $(".content-wrapper .content-header ol.breadcrumb");
            $breadcrumb.empty();
            $li.each(function (index, elem) {
                var levelName = $(elem).children("a").find("span").eq(0).text();
                if (index == $li.length - 1) {
                    $breadcrumb.prepend("<li><i class='fa fa-dashboard'></i> " + levelName + "</li>")
                } else {
                    $breadcrumb.prepend("<li> " + levelName + "</li>")
                }
            })
            if (url) {
                $(".content_loading").show();
                $(".content-wrapper section.content").load(url + "?t=" + new Date().getTime(), function () {
                    globalVar.curUrl = url;
                });
            }
        }
        if ($(this).parents("ul.treeview-menu").length == 1) {
            $(this).parents("li.treeview ").addClass("active");
        }
    }

    function fn() {
    }
</script>
</body>
</html>